from rest_framework import serializers
from .models import *



class UserModelSer(serializers.ModelSerializer):
    # 用来作为用户注册用户修改使用
    class Meta:
        model = User
        fields = "__all__"



class ShowUserModelSer(serializers.ModelSerializer):
    # 用户展示，不做反序列化添加和修改
    class Meta:
        mode = User
        fields = ('id', 'username', 'email', 'phone')
